package pt.um.jspecput.util;

import static org.junit.Assert.*;

import org.databene.benerator.anno.InvocationCount;
import org.databene.feed4junit.Feeder;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;

@RunWith(Feeder.class)
public class ExitExceptionTest {

    private static ExitException e;

    @Before
    public void setUp() throws Exception {
        e = new ExitException(0);
    }

    @After
    public void tearDown() throws Exception {
        e = null;
    }

    @Test
    @InvocationCount(10)
    public void testSetGetStatus(int status) {
        e.setStatus(status);
        
        assertEquals(status, e.getStatus());
    }

    @Test
    @InvocationCount(10)
    public void testExitException(int status) {
        int expected = status;
        ExitException e = new ExitException(status);

        assertEquals(expected, e.getStatus());
    }
}
